using System;
using System.Collections.Generic;
using System.Text.Json;

namespace tafei_thingsapi.Models.Dtos
{

    public class ThingPropertyMessage
    {
        public string msgType { get; set; }
        public SubData subData { get; set; }

        public override string ToString()
        {
            return JsonSerializer.Serialize(this);
        }
    }

    public class SubData
    {
        public string deviceId { get; set; }
        public string deviceName { get; set; }
        public string productId { get; set; }
        public long time { get; set; }
        public Dictionary<string, PropertyValue> @params { get; set; }
    }

    public class PropertyValue
    {
        public object value { get; set; }
        
        public long time { get; set; }
    }
} 